map a-0 (setparcol 0 title `Left Margin Set To 0')
# a-[ sets the left margin to the column position.
map a-[ (ifelse l a-0 sa-[)
# a-] sets the right margin to the column position.
map a-] (margin (\$colno) title `Right Margin Set To (\$colno)')
map a-= (setparcol -1 title `Left Margin Set To -1')
#Justification
map A-[ (ifelse cb (goto end while cb (justify left up) goto start) (justify left))
map A-] (ifelse cb (goto end while cb (justify right up) goto start) (justify right))
map A-= (ifelse cb (goto end while cb (justify center up) goto start) (justify center))
map A-@ (if !cb lineblock set m (\$colno) dec m indent b -255 indent b (\$m) unblock)
map A-j (ifelse cb (goto end first while cb (justify full up if r (up up))) (justify full))
map A-J (ifelse cb (goto end while cb (unjustify up) goto start) unjustify)
map A-i (title (Enter the number of spaces to indent.) escimm (set m ) indent b (\$m) unblock)
map A-{ (up firstnb set m (\$colno) dec m down indent . -255 indent . (\$m))
#Format
map c-h (indent . -255 first set m 9 while ca right sub m (\$colno) indent . (\$m) My-f)
map xa-f (down firstnb ifelse r (a-= up) (a-[ up join) reformat)
map x-p (title `Enter First Page #' escimm (set pn ) top while !b (inslines 6 repeat 31 downadd inslines 3 goto +3 insert (\$pn) A-= inc pn last tlate 12 downadd))
#Outline
map My-tab (indent . -255 first ifelse cn (set m 17) (ifelse cl (set m 25) (set m 13)) My-o)
map Mys-tab (indent . -255 first ifelse cl (set m 21) (set m 9) My-o)
map My-o (while ca right sub m (\$colno) if c=41 (add m 12) indent . (\$m) My-f)
map My-f (firstnb while ca right right ifelse r (tab a-[) My-h)
map My-h (wright split last tab set m (\$colno) dec m down first push block bstart while !r downadd up bend indent b -255 indent b (\$m) goto start unblock pop block firstnb a-[ reformat indent . -255 up join)
map My-return (if !t (first while !r up down) firstnb sc-c first while !r downadd downadd if !r (insline insline) col \$C)
#Spacing
map x-1 (goto start first while cb (if r deline if !r downadd))
map x-2 (x-1 goto start while cb (down if cb (insline down)))
map A-1 (ifelse cb x-1 (Mx-p x-1 unblock pop block))
map A-2 (ifelse cb x-2 (Mx-b x-2 unblock pop block))
map xy-2 (goto start while cb (Mx-b x-2 down pop block))
map xy-2 (top while !b (Mx-b x-2 down))
map xy-1 (top while !b (Mx-p x-1 down))
map A-! (x-1 goto start while cb (if !t (firstnb if !l (insline down)) downadd))
#Proofs
map M-tab (col 40 if !r (last col +5) insert (// ))
map M-return (firstnb scanf %[0123456789] set ln (\$scanf) last split down first inc ln insert (\$ln.) up first wright if c="Show" (col +2) down)
map a-| (goto block first find Show down while cb (overwrite (|) left down) unblock)
map `a-(' ``¬''
map `a-)' ``º''
map a-nk/ ``÷''
map a-nk* ``ª''
#Deletion
map bs (ifelse l (up last join if !l right) (ifelse i bs (left ` ' left)))
map del (ifelse r (if !b (last join)) del)
map a-bs (ifelse l (up last join right) (split scanf l deline first))
map a-del (ifelse r join (scanf l remeol))
map s-del (if c=32 wright scanf w findstr (\$scanf) repstr `' replace right bs)
map s-bs (resettoggle 1 if !l (left if c<>32 (toggle 1) right) if 1 (( )) wleft scanf %s findstr (\$scanf) repstr `' replace right if !l (while c=32 del))
map Mx-b (push block first while !r (if t break up) if r down bstart while !r (down if b break) if r up bend)
map Mx-p (push block firstnb while l (up if t break firstnb) bstart down firstnb while l (down if b break firstnb) if !l up last while l (up last) bend)
#Line
map a-nk. (first deline)
map a-nk0 (split down undeline up join join)
map a-nk2 (deline downadd undeline)
map a-nk4 (wleft a-t)
map a-nk6 (a-t wright)
map a-nk8 (deline up undeline)
map a-z (undeline)
#File Requester
map f1 (arpinsfile)
map f2 (rx Diary text-mode)
map f3 (rx1 FileOp Decrypt)
map f8 (barpsave)
map f9 (rx1 FileOp Saveas)
map A-o (rx1 FileOp Replace)
map A-n (rx1 MultiFiles Load)
#Other File Operations
map c-f4 (ca-w title `Change Filename' escimm (chfilename `\$filename) sc-w)
map Mc-k (indent . -255 first ifelse c="{" (up firstnb set m (\$colno)) Mc-g Mcs-2)
map Mc-g (set m 1 if c<>"#" (ifelse c="else" Mc-e (ifelse c="}" Mc-2 (Mc-f if 5 (ping 9 wleft ifelse c="else" Mcs-0 (last left ifelse c=41 Mcs-0 (ifelse c="," Mc-, Mc-;)))))))
map Mcs-0 (firstnb tab set m (\$colno) pong 9)
map Mc-; (pong 9 insert (}) left force s match sc-l if c="{" (force s firstnb if c="switch" (force s tab) set m (\\\$colno) pong 9) del add m 4 last if !l (left if c=":" (sub m 4)) pong 9)
map Mc-, (pong 9 insert (}) left force s match sc-l if c="{" (force s firstnb if c="switch" (force s tab) tab set m (\\\$colno) pong 9) del add m 4 last if !l (left if c=":" (sub m 4)) pong 9)
map Mc-f (settoggle 5 if !r (insert (}) left force s match ifelse c="{" (force s match) (resettoggle 5) del))
#map Mcs-2 (ifelse r (col (\$m)) (split col (\$m) join))
map sa-[ (left ifelse x<\$margin (setparcol \$colno title `Left Margin Set To \$colno') (title (Can't Set Left Margin To \$colno. The Right Margin is \$margin.)) right)
map ca-o (if !r (ping 0 firstnb wright split return while !r (firstnb split first join return) pong 0 down while !r (insline join down) pong 0 down reformat firstnb split first join pong 0 join))